<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<!--#    Copyright 2011 Tri-County Electric Cooperative, St. Matthews, South Carolina
#    This file is part of COOPIP.
#    COOPIP is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#    COOPIP is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License
#    along with COOPIP.  If not, see <http://www.gnu.org/licenses/>.-->

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Dispatch Board</title>
  <link rel="stylesheet" type="text/css" href="/style.css" />
  <style>
      img{
      width: 640px;
      height: 360px;
      }
  </style>

</head>
<body style="background-color: tan;">
  <div id="dispatchmap_noninteractive_wrapper">
  <a href="/coopip/dispatch/view/cameras/SDO/">Santee</a><br>
  <a href="/coopip/dispatch/view/cameras/RDO/">Richland</a><br>
      <!--BurkeRd-->
      <img id="camera1", src="/test.png">
      <img id="camera2", src="/test.png">
      <img id="camera3", src="/test.png">
      <!--Hammonds-->
      <img id="camera4", src="/test.png">
      <img id="camera5", src="/test.png">
      <!--SandyRun-->
      <img id="camera6", src="/test.png">
      <img id="camera7", src="/test.png">
      <!--StMatthews-->
      <img id="camera8", src="/test.png">
      <img id="camera9", src="/test.png">
      <!--Silver Lake-->
      <img id="camera10", src="/test.png">
      <img id="camera11", src="/test.png">
  </div>

  <script src="/jquery.js"></script>
  <script>
      function reloadExternal() {
          //single connection limit
          if (RequestInProgress != true){
              RequestInProgress = true;
              var date = new Date();
              var datetime = date.getTime();
              //this loads the image by force-changing the source each time; if image fails, no recovery.
              $("#camera1").attr("src", "http://192.168.150.101/snapshot.cgi?chan=01?" + datetime);
              $("#camera2").attr("src", "http://192.168.130.140/snapshot.cgi?chan=01" + datetime);
              $("#camera3").attr("src", "http://192.168.130.141/snapshot.cgi?chan=01?" + datetime);
              $("#camera4").attr("src", "http://192.168.130.112/snapshot.cgi?chan=01?" + datetime);
              $("#camera5").attr("src", "http://192.168.130.113/snapshot.cgi?chan=01?" + datetime);
              $("#camera6").attr("src", "http://192.168.130.43/snapshot.cgi?chan=01?" + datetime);
              $("#camera7").attr("src", "http://192.168.130.44/snapshot.cgi?chan=01?" + datetime);
              $("#camera8").attr("src", "http://192.168.135.23/snapshot.cgi?chan=01?" + datetime);
              $("#camera9").attr("src", "http://192.168.135.24/snapshot.cgi?chan=01?" + datetime);
              $("#camera10").attr("src", "http://192.168.130.82/snapshot.cgi?chan=01?" + datetime);
              $("#camera11").attr("src", "http://192.168.130.83/snapshot.cgi?chan=01?" + datetime);
              RequestInProgress = false;
          }
      }

      function delayThenReload() {
          window.setInterval(reloadExternal, ReloadIntervalMilliseconds);
      }

      //default for .load() timeout is 0, change in global settings
      var RequestInProgress = false;
      var ReloadIntervalMilliseconds = 2000;
      reloadExternal();
      $(window).load(delayThenReload); 
  </script>

</body>
</html>
